<%--
    file: profile.jsp
--%>
<%@page 
    contentType="text/html" pageEncoding="UTF-8"
%>
<%
    String message = "";
    if (null != request.getAttribute("msg")) {
        message = request.getAttribute("msg").toString();
    }
    String scuccess = "";
    if (null != request.getAttribute("scuccess")) {
        scuccess = request.getAttribute("scuccess").toString();
    }


%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="/StudentClientWeb/img/style.css" />
        <title>Module Search System</title>
    </head>

    <body>
        <div id="page">

            <div id="header">
                <h1>Module Search System</h1>
                <h2>Web-based client application, Module Search System for Student</h2>

            </div>
            <div id="bar">
                <div class="link"><a href="module">Module Search</a></div>
                <div class="link"><a href="mymodules">My Modules</a></div>
                <div class="link"><a href="profile">Profile</a></div>
                <div class="link"><a href="logout">Logout</a></div>
            </div>
            
            <% if ("true" == scuccess) {%>
            <div class="notify notify-green"><span class="symbol icon-tick"></span> <%= message%></div>
            <% } else if ("false" == scuccess) {%>
            <div class="notify notify-red"><span class="symbol icon-error"></span> <%= message%> </div>
            <% }%>
            <div class="contentTitle"><h1>Change Password</h1></div>
            <div class="contentText"  height="300">
                <form action="profile">
                <table width="500" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="120" style="text-align:right">Old Password</td>
                    <td><input type="password" name="oldpassword" class="tb4"/></td>
                  </tr>
                  <tr>
                    <td style="text-align:right">New Password</td>
                    <td><input type="password" name="newpassword"/></td>
                  </tr>
                  <tr>
                    <td><input type="hidden" name="reqfunction" value="changepassword"/></td>
                    <td><input type="submit" value="Update"></td>
                  </tr>
                </table>			
        
                </form>
            </div>
            
            <div class="contentTitle"><h1>Update Email</h1></div>
            <div class="contentText"  height="300">
                <form action="profile">
                <table width="500" border="0" cellspacing="0" cellpadding="5">
                  <tr>
                    <td width="120" style="text-align:right">Email</td>
                    <td><input type="text" name="email"/></td>
                  </tr>
                  <tr>
                    <td style="text-align:right">New Email</td>
                    <td><input type="text" name="newemail"/></td>
                  </tr>
                  <tr>
                    <td><input type="hidden" name="reqfunction" value="changeemail"/></td>
                    <td><input type="submit" value="Update"></td>
                  </tr>
                </table>			
        
                </form>
            </div>
        </div>
        <div id="footer"><a href="http://www.culin.net">web development</a> by <a href="http://www.cuilin.com">Cui Lin</a></div>
    </body>
</html>